<link rel="stylesheet" href="/css/other.css" type="text/css" />

<% @pages = @pages.order(created_at: :desc).page(params[:page] || 1).per(10) %>

<%= render "cip/pages/banner" %>
<div class="grid ovf clear">
  <%= render "cip/pages/sidebar" %>

  <div class="fr-box fr ovf">
    <div class="bread fl c0b f14"><a href="/">首页</a><span> > </span><% @category.ancestors.each do |category| %><a href="<%= cip_category_path(category) %>"><%= category.title %></a><span> > </span><% end %><a href="<%= cip_category_path(@category) %>"><%= @category.title %></a></div>

    <div class="text fl clear">
      <div class="clear fl main-txt3 ">
        <ul>
          <% @pages.each do |page| %>
            <li>
              <div class="fl"><a href="<%= page.url %>"><img src="<%= page.avatar.url(:thumb) %>" width="100px" height="100px"></a></div>
              <div class="fr-des fl">
                <div class="top fl">
                     <div class="fl">
                      <font class="c34 f14 b"><a href="<%= page.url %>"><%= page.title %></a></font><br>
                      <Font class="c86">发表日期：<%= l page.created_at, format: :long %> &nbsp;&nbsp;&nbsp; 文章编辑：<%= page.author %> &nbsp;&nbsp;&nbsp;  浏览次数：<%= page.view_count || 0 %></Font>
                     </div>
                     <div class="fr"><a href="<%= page.url %>" target="" class="view-bt fyh f16">阅读全文</a></div>
                </div>
                <div class="clear fyh c9b lh22">
                  <%= truncate ActionView::Base.full_sanitizer.sanitize(page.content), length: 120 %>
                  &nbsp;
                </div>
              </div>
            </li>
          <% end %>
        </ul>
      </div>
    </div>

    <div class="page_list"><div class="list_info tec">
      <%= paginate @pages %>
    </div></div>

  </div>
</div>
